<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    span {
      padding: 10px;
      border: 1px solid black;
      margin: 10px;
    }
    .box {
      height: 100px;
      width: 100px;
      border: 5px solid black;  

    }
    .box1 {
      margin-bottom: 10px;
    }
    .box2 {
      margin-top: 50px;
      margin-left: 10px;
    }
    .childbox {
      width: 50px;
      height: 50px;
      margin-left: 10px;
      border: 4px solid black;
      /* margin-top: 80px; */
    }
    .box3 {
      display: flex;
    }
    .child {
      width: 20px;
      height: 20px;

    }
    .child2 {
      margin-left: -20px;
    }
  </style>
</head>
<body>
  <div class="wrapper">
    <span>this is span</span>
    <p>盒模型不完全适用于内联格式化上下文，<span>this is span</span>水平方向的 padding，border，margin可以应用于元素，并左右移动文本；但是元素垂直方向的 margin 将不适用，并且垂直方向的的 padding 和 border 可能会在内容的上方和下方重叠；</p>
  </div>
  <div class="box box1">box1</div>
  <div class="box box2"> 
    <div class="childbox">child</div>
  </div>
  <!-- <div class="box box3">
    <div class="child">1</div>
    <div class="child child2">2</div>
  </div> -->
  
</body>
</html>